sink("run.log", split = TRUE)

start_time <- Sys.time()
cat("Starting replication at: ", format(start_time, "%A, %d %B %Y %H:%M:%S"), "\n")

rm(list = ls())

library(tidyverse)
library(tidylog)
library(haven)
library(janitor)
library(adaR)
library(anesrake)
library(scales)
library(srvyr)
library(ggridges)
library(survey)
library(kableExtra)
library(rstan)
library(estimatr)
library(marginaleffects)
library(rstatix)
library(openxlsx)
library(stargazer)

source("code/1-define-survey-profs.R")
source("code/2-recode-weight-surveys.R")
source("code/3-create-analysis-data.R")
source("code/4-describe-data.R")
source("code/RQ1-professionalism-prevalence.R")
source("code/RQ2-sociodemographics.R")
source("code/RQ3ab-speeding-straightlining.R")
source("code/RQ3c-response-instability.R")
source("code/RQ4-repeated-participation.R")

end_time <- Sys.time()
cat("Replication completed at: ", format(end_time, "%A, %d %B %Y %H:%M:%S"), "\n")

sink()